package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Set;


/**
 * The persistent class for the PE_NATU database table.
 * 
 */
@Entity
@Table(name="PE_NATU")
public class PeNatu implements Serializable {
	private static final long serialVersionUID = 1L;
	private long peNatuId;
	private String apeMat;
	private String apePat;
	private BigDecimal giroId;
	private String nombres;
	private String tiPers;
	private Set<Cuenta> cuentas;
	private Set<PeJuri> peJuris;
	private Persona persona;
	private PeJuri peJuri;

    public PeNatu() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PE_NATU_ID", unique=true, nullable=false)
	public long getPeNatuId() {
		return this.peNatuId;
	}

	public void setPeNatuId(long peNatuId) {
		this.peNatuId = peNatuId;
	}


	@Column(name="APE_MAT", length=30)
	public String getApeMat() {
		return this.apeMat;
	}

	public void setApeMat(String apeMat) {
		this.apeMat = apeMat;
	}


	@Column(name="APE_PAT", nullable=false, length=30)
	public String getApePat() {
		return this.apePat;
	}

	public void setApePat(String apePat) {
		this.apePat = apePat;
	}


	@Column(name="GIRO_ID")
	public BigDecimal getGiroId() {
		return this.giroId;
	}

	public void setGiroId(BigDecimal giroId) {
		this.giroId = giroId;
	}


	@Column(nullable=false, length=40)
	public String getNombres() {
		return this.nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}


	@Column(name="TI_PERS", length=1)
	public String getTiPers() {
		return this.tiPers;
	}

	public void setTiPers(String tiPers) {
		this.tiPers = tiPers;
	}


	//bi-directional many-to-one association to Cuenta
	@OneToMany(mappedBy="peNatu")
	public Set<Cuenta> getCuentas() {
		return this.cuentas;
	}

	public void setCuentas(Set<Cuenta> cuentas) {
		this.cuentas = cuentas;
	}
	

	//bi-directional many-to-one association to PeJuri
	@OneToMany(mappedBy="peNatu")
	public Set<PeJuri> getPeJuris() {
		return this.peJuris;
	}

	public void setPeJuris(Set<PeJuri> peJuris) {
		this.peJuris = peJuris;
	}
	

	//bi-directional many-to-one association to Persona
    @ManyToOne
	@JoinColumn(name="PERSONA_ID", nullable=false)
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}
	

	//bi-directional many-to-one association to PeJuri
    @ManyToOne
	@JoinColumn(name="PE_JURI_ID")
	public PeJuri getPeJuri() {
		return this.peJuri;
	}

	public void setPeJuri(PeJuri peJuri) {
		this.peJuri = peJuri;
	}
	
}